package com.xmall.mapper;

import com.xmall.bean.table.User;
import com.xmall.bean.table.UserExample;
import com.xmall.bean.vo.RowsUserVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    /**
     * 返回一个按日期统计的用户数量的List
     * @return 用户数量
     */
    List<RowsUserVO> countUsersByAddTime();
}